﻿using System;
using System.ServiceModel;

namespace CoreEx.Wcf.Common
{
    /// <summary>
    /// Represents a class that is capable of creating an interface that is compliant 
    /// with the requriments of a WCF service contract.
    /// </summary>
    public interface IServiceContractBuilder
    {
        /// <summary>
        /// Creates a WCF service contract.
        /// </summary>        
        /// <param name="type">The source interface for witch to create the service contract.</param>
        /// <returns>An interface representing a WCF service contract</returns>        
        Type CreateServiceContract(Type type);
        
        /// <summary>
        /// Creates a WCF service contract.
        /// </summary>
        /// <param name="type">The source interface for witch to create the service contract.</param>
        /// <param name="createAttributes">Indicates if the <see cref="ServiceContractAttribute"/> 
        /// and the <see cref="OperationContractAttribute"/> should be added to the new type.</param>
        /// <returns>An interface representing a WCF service contract</returns>        
        Type CreateServiceContract(Type type, bool createAttributes);
    }
}
